# 导包
from jiuxian.Base import Base
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
import time

class Page1(Base):
    # 点击登录
    login_loc=(By.XPATH,'/html/body/div[2]/div/div[1]/div/a[1]')
    # 输入账号
    username_loc=(By.ID,'userName')
    # 输入密码
    password_loc=(By.ID,'password')
    # 登录成功
    dl_loc=(By.ID,'save')
    # 关闭公告
    gb_loc=(By.ID,'bindSub')

    def login(self):
        self.click(self.login_loc)

    def username(self):
        self.send_keys(self.username_loc,'17601636724')

    def password(self):
        self.send_keys(self.password_loc,'123456Aa')

    def dl(self):
        self.click(self.dl_loc)

    def gb(self):
        self.click(self.gb_loc)

    def jiuxian_luoji1(self):
        self.open_url('https://www.jiuxian.com/')
        self.login()
        self.username()
        self.passward()
        time.sleep(10)
        self.dl()
        self.gb()

